<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>欢迎访问产品运营互动中心！</title>
<link rel="stylesheet" href="<s:url value="/css/style_new.css"/>">
<link href="<s:url value="/images/08_ccxxzx.css"/>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<s:url value="/script/sysOper.js"/>"></script>
<script type="text/javascript" src="<s:url value="/script/selfResize.js"/>"></script>
<script type="text/javascript" src="<s:url value="/components/datepicker/WdatePicker.js"/>"></script>
<script>
function show(url){
	window.open(url);
}
function initLoad(){
	f_iframeResize();
}
window.onload = initLoad;
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<s:form action="resolveDemand.action" namespace="/bpm" method="post" enctype="multipart/form-data">
<table width="980" border="0" cellspacing="0" cellpadding="0" align="center">
		<tr>
			<td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0"
				background="<s:url value="/images/new/gxzl_index_2.gif"/>">
				<tr>
					<td width="20" height="32">&nbsp;</td>
					<td width="20"><img
						src="<s:url value="/images/new/dq_dot.gif"/>" width="15"
						height="12" /></td>
					<td>当前位置：分解需求单</td>

				</tr>
			</table>
			</td>
		</tr>
	<tr>
		<td background="<s:url value="/images/home_4a.gif"/>">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
			<tr>
				<td width="20%" valign="top">
				<table width="100%" height="400"  border="0" cellspacing="0" cellpadding="0"
					align="center" bgcolor="#FFFFFF">
					<tr>
						<td valign="top" align="center">
							<input type="hidden" name="refIds" value="${refIds}">
							<input type="hidden" name="oldProdAdvReqId" value="${prodAdvReq.id}">
							<input type="hidden" name="prodAdvReq.tranStatus" value="PENDING">
							<table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
								<br/>
								<tr>
									<td height="5">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab1.gif"/>" width="5" height="5" /></td>
												<td class="tdborderup"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
												<td width="5"><img src="<s:url value="/images/cphdzx_tab2.gif"/>" width="5" height="5" /></td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td  class="tdborderleftright">
									<TABLE width="98%" cellSpacing=1 cellPadding=0 align="center">
										<TR height=30>
											<TD align=left width="10%"><input type="submit" name="Submit" value="保 存" onclick="return save();"><input type="button"
												value="返 回" onClick="location.href='/bpm/listResolveDemand.action'">

											</TD>
										</TR>
									</table><br>
									<s:if test='%{prodAdvReq.reqCode!=null}'>
										&nbsp;&nbsp;&nbsp;需求单号：${prodAdvReq.reqCode}<input type="hidden" name="prodAdvReq.reqCode" value="${prodAdvReq.reqCode}">
									</s:if>
									<table width="98%" border="0" cellspacing="0" cellpadding="7" align="center" class=tablecolor2>
										
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2"><font color="red">*</font>需求名称：</div></td>
                    <td colspan="3">
                    	<input type="text" name="prodAdvReq.name" value="${prodAdvReq.name}" size="110">
                    </td>
                  </tr>
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2"><font color="red">*</font>发 起 人：</div></td>
                    <td width="286">
											<input type="hidden" name="prodAdvReq.startPerson.id" value="${prodAdvReq.startPerson.id}">
											<input type="text" name="startPerson" readonly value="${prodAdvReq.startPerson.name}">
                    	<input type="button" name="人员选择" value="人员选择" class="buttoncom4" onclick="selectStartPerson()" />
                    </td>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">发起部门：</div></td>
                    <td width="268">
                    	<input type="text" name="startDept" value="${prodAdvReq.startDept.name}" class="input_nob" size="40" readonly>
                    	<input type="hidden" name="prodAdvReq.startDept.id" value="${prodAdvReq.startDept.id}" >
                    </td>
                  </tr>
                  <tr>
                  </tr>

                  <tr>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">产品经理：</div></td>
                    <td width="268">
											<input type="hidden" name="prodAdvReq.prodPerson.id" value="${prodAdvReq.prodPerson.id}">
											<input type="text" name="prodPerson" readonly value="${prodAdvReq.prodPerson.name}">
                    	<input type="button" name="人员选择" value="人员选择" class="buttoncom4" onclick="selectPersonsBy()" />
                    </td>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">产品部门：</div></td>
                    <td>
                    	<input type="text" name="prodDept" value="${prodAdvReq.prodDept.name}" class="input_nob" size="40" readonly>
                    	<input type="hidden" name="prodAdvReq.prodDept.id" value="${prodAdvReq.prodDept.id}" >
                    </td>
                  </tr>
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">需求类别：</div></td>
                    <td >
					<s:select name="prodAdvReq.type.id"
						list="types" listKey="id" listValue="name"
						theme="css_xhtml" />
					  				</td>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">重要性：</div></td>
                    <td width="268">
						<s:select name="prodAdvReq.importance.id"
							list="importances" listKey="id" listValue="name"
							theme="css_xhtml" />
                    </td>
                  </tr>              
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2"><font color="red">*</font>优化内容：</div></td>
                    <td colspan="3">
											<textarea name="prodAdvReq.content" cols="96" rows="4">${prodAdvReq.content}</textarea>
					  				</td>
                  </tr>
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">备&nbsp;&nbsp;&nbsp;&nbsp;注：</div></td>
                    <td colspan="3">
											<s:textarea name="prodAdvReq.remark" theme="css_xhtml" cols="96" rows="4" />
					  				</td>
                  </tr>
                  
                  
                  
                </table>
									</td>
								</tr>
								<tr>
									<td height="5">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab3.gif"/>" width="5" height="5" /></td>
												<td class="tdborderbottom"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
												<td width="5"><img src="<s:url value="/images/cphdzx_tab4.gif"/>" width="5" height="5" /></td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
							</td>
					</tr>
					
					
					
<s:iterator id="newProdAdvReq" value="newProdAdvReqs">

					<tr>
						<td>
							<table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
								<br/>
								<tr>
									<td height="5">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab1.gif"/>" width="5" height="5" /></td>
												<td class="tdborderup"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
												<td width="5"><img src="<s:url value="/images/cphdzx_tab2.gif"/>" width="5" height="5" /></td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td  class="tdborderleftright">
									<TABLE width="98%" cellSpacing=1 cellPadding=0 align="center">
										<TR height=30>
											<TD align=left width="10%">
												已分解需求单
											</TD>
										</TR>
									</table>
									<table width="98%" border="0" cellspacing="0" cellpadding="7" align="center" class=tablecolor2>
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">需求名称：</div></td>
                    <td colspan="3">
											${newProdAdvReq.name}
                    </td>
                  </tr>
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">发 起 人：</div></td>
                    <td width="286">
											${newProdAdvReq.startPerson.name}
                    </td>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">发起部门：</div></td>
                    <td width="268">
                    	${newProdAdvReq.startDept.name}
                    </td>
                  </tr>
                  <tr>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">发起时间：</div></td>
                    <td width="268">
												${newProdAdvReq.begin}
                    </td>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">需求类别：</div></td>
                    <td width="268">
                    	${newProdAdvReq.type.name}
                    </td>
                  </tr>
                  <tr>
                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">产品经理：</div></td>
                    <td width="268">
											${newProdAdvReq.prodPerson.name}
                    </td>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">产品部门：</div></td>
                    <td>
                    	${newProdAdvReq.prodDept.name}
                    </td>
                  </tr>
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">重要性：</div></td>
                    <td >
                    	${newProdAdvReq.importance.name}
					  				</td>
                    <td bgcolor="D6E3FA" width="140">
                    </td>
                    <td width="268">
                    </td>
                  </tr>
                  <tr>
                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">优化内容：</div></td>
                    <td colspan="3">
											<textarea cols="96" rows="4" readonly>${newProdAdvReq.content}</textarea>
					  				</td>
                  </tr>
                </table>
									</td>
								</tr>
								<tr>
									<td height="5">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab3.gif"/>" width="5" height="5" /></td>
												<td class="tdborderbottom"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
												<td width="5"><img src="<s:url value="/images/cphdzx_tab4.gif"/>" width="5" height="5" /></td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
</s:iterator>
					
					<tr>
						<td>
							<table width="98%" align="center" border="0" cellspacing="0" cellpadding="0"><br>
								<tr>
									<td height="5">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab1.gif"/>" width="5" height="5" /></td>
												<td class="tdborderup"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
												<td width="5"><img src="<s:url value="/images/cphdzx_tab2.gif"/>" width="5" height="5" /></td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td  class="tdborderleftright">
									<TABLE width="98%" cellSpacing=1 cellPadding=0 align="center">
										<TR height=30>
											<TD align=left width="10%">
												原分解需求单
											</TD>
										</TR>
									</table>
									<table width="98%" border="0" cellspacing="0" cellpadding="7" align="center" class=tablecolor2>
	                  <tr>
	                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">需求名称：</div></td>
	                    <td colspan="3">
												${prodAdvReq.name}
	                    </td>
	                  </tr>
	                  <tr>
	                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">发 起 人：</div></td>
	                    <td width="286">
												${prodAdvReq.startPerson.name}
	                    </td>
	                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">发起部门：</div></td>
	                    <td width="268">
	                    	${prodAdvReq.startDept.name}
	                    </td>
	                  </tr>
	                  <tr>
	                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">发起时间：</div></td>
	                    <td width="268">
													${prodAdvReq.begin}
	                    </td>
	                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">需求类别：</div></td>
	                    <td width="268">
	                    	${prodAdvReq.type.name}
	                    </td>
	                  </tr>
	                  <tr>
	                    <td bgcolor="D6E3FA" width="140"><div align="right" class="STYLE2">产品经理：</div></td>
	                    <td width="268">
												${prodAdvReq.prodPerson.name}
	                    </td>
	                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">产品部门：</div></td>
	                    <td>
	                    	${prodAdvReq.prodDept.name}
	                    </td>
	                  </tr>
	                  <tr>
	                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">重要性：</div></td>
	                    <td >
	                    	${prodAdvReq.importance.name}
						  				</td>
	                    <td bgcolor="D6E3FA" width="140">
	                    </td>
	                    <td width="268">
	                    </td>
	                  </tr>
	                  <tr>
	                    <td bgcolor="D6E3FA"><div align="right" class="STYLE2">优化内容：</div></td>
	                    <td colspan="3">
												<textarea cols="96" rows="4" readonly>${prodAdvReq.content}</textarea>
						  				</td>
	                  </tr>
                	</table>
									</td>
								</tr>
								<tr>
									<td height="5">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab3.gif"/>" width="5" height="5" /></td>
												<td class="tdborderbottom"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
												<td width="5"><img src="<s:url value="/images/cphdzx_tab4.gif"/>" width="5" height="5" /></td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
					
						</td>
					</tr>
				</table>
			</s:form>
</body>
<script>
function check(){
	if(document.all['prodAdvReq.name'].value==""){
		alert("需求名称不能为空，请输入！");
		return false;
	}
}

function selectStartPerson(){
	var url="<s:url value='/' escapeAmp='false'/>"+"organ/selectPerson.action";	
	var returnData=window.showModalDialog(url,window,"status:no;dialogWidth:960px;dialogHeight:640px;scroll:yes;");
	if(returnData){
		document.all['startPerson'].value=returnData[1];
		document.all['prodAdvReq.startPerson.id'].value=returnData[0];
		document.all['startDept'].value="";
		document.all['prodAdvReq.startDept.id'].value="";
	}
}
function selectPersonsBy(){
	var url="<s:url value='/' escapeAmp='false'/>"+"organ/selectPerson.action";	
	var returnData=window.showModalDialog(url,window,"status:no;dialogWidth:960px;dialogHeight:640px;scroll:yes;");
	if(returnData){
		document.all['prodPerson'].value=returnData[1];
		document.all['prodAdvReq.prodPerson.id'].value=returnData[0];
		document.all['prodDept'].value="";
		document.all['prodAdvReq.prodDept.id'].value="";
	}
}
function check(){
	if(document.all['prodAdvReq.name'].value==""){
		alert("需求名称不能为空，请填写！");
		return false;
	}
	if(document.all['prodAdvReq.content'].value==""){
		alert("需求内容不能为空，请填写！");
		return false;
	}
	return true;
}
function save(){
	return check();
}

function isNullSel(obj){
	if(obj&&obj.options&&obj.options.selectedIndex!=-1&&obj.options[obj.options.selectedIndex].value!=""){
		return false;
	}
	return true;
}

</script>
</html>